<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>智慧考务</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta name=”apple-mobile-web-app-status-bar-style” content=”default” />
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black” />
    <meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent” />
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta name="format-detection" content="telephone=no"/>

    <link href="${s.base}/mobile/css/weui.min.css" rel="stylesheet" />
    <link href="${s.base}/mobile/css/jquery-weui.css" rel="stylesheet" />
    <link href="${s.base}/mobile/css/zhkw.css" rel="stylesheet">
    <script type="text/javascript" src="${s.base}/mobile/js/fontSize.js"></script>
</head>
<body>
<div class="main-content75" style="background:#f2f2f2 url(${s.base}/mobile/images/kw/topbg.jpg) top center no-repeat;background-size:100% 3.05rem;">
    <div class="content-nei">
        <div class="avatar-ctn" style="background:url(${s.base}/mobile/images/kw/avatar.jpg) top center no-repeat;background-size:cover;">
        </div>
        <div class="user-name">${name}</div>
        <div class="white-block">
            <div class="cont-tit">考务管理</div>
            <div class="my-main-task clearfix">
                <ul>
                    <li id="kwHandle"><img src="${s.base}/mobile/images/kw/kwxx.png"></li>
                    <li id="signHandle"><img src="${s.base}/mobile/images/kw/kqqdgl.png"></li>
                </ul>
            </div>
            <div class="cont-mid-tit">快捷入口</div>
            <div class="task-list-ctn">
                <ul>
                    <li>
                        <i class="cyfont" id="waitsignHandle">&#xe648;</i>
                        <h1>待签到</h1>
                    </li>
                    <li>
                        <i class="cyfont" id="myjkHandle">&#xe6c0;</i>
                        <h1>我的监考</h1>
                    </li>
                    <li>
                        <i class="cyfont" id="myxkHandle">&#xe649;</i>
                        <h1>我的巡考</h1>
                    </li>
                    <li>
                        <i class="cyfont" id="endsignHandle">&#xe644;</i>
                        <h1>已结束</h1>
                    </li>
                </ul>
            </div>
        </div>
        <div class="white-block marb20">
            <div class="cont-tit">最新消息</div>
            <div class="news-list-ctn">
                <ul id="my-society-list">
                    <li>
                        <div class="news-type blue">待签到</div>
                        <h1 class="ellipsis">[语文考试]-3号教学楼102教室</h1>
                        <div class="div-line-txt">监考老师：<span>黄小霞、唐天会</span></div>
                        <div class="div-line-txt">巡考老师：<span>田明明、钱齐辉</span></div>
                        <div class="div-line-txt">考试时间：<span>2019-10-28  8:00-10:00</span></div>
                    </li>
                    <!--<li>-->
                        <!--<div class="news-type green">未开始</div>-->
                        <!--<h1 class="ellipsis">[语文考试]-3号教学楼102教室</h1>-->
                        <!--<div class="div-line-txt">监考老师：<span>黄小霞、唐天会</span></div>-->
                        <!--<div class="div-line-txt">巡考老师：<span>田明明、钱齐辉</span></div>-->
                        <!--<div class="div-line-txt">考试时间：<span>2019-10-28  8:00-10:00</span></div>-->
                    <!--</li>-->
                </ul>
            </div>
        </div>
    </div>
</div>
</body>


<script type="text/javascript" src="${s.base}/mobile/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/fontSize.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/jquery-weui.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/fastclick.js"></script>
<script type="text/javascript" src="${s.base}/mobile/js/common.js"></script>
<script type="text/javascript">
    var applyId = '${applyId}';
    var token = '${token}';

    $(function () {
        FastClick.attach(document.body);
        initListener();
        initMySocietyData();
    });

    function initMySocietyData() {
        $.fn.doPost('/phone/kwmanagement/getTeacherJKList', {applyId:applyId,token:token,type:"4"}, function (result) {
            if (result.code === 0) {
                postMySocietyData(result.data);
            } else {
                $.toast('获取数据失败', "text");
            }
        });

    }
    function postMySocietyData(data) {
        var str = '';
        var num;
        if (data != null && data.length > 0) {
            if(data.length<=2){
               num = data.length;
            }else {
                num = 2;
            }
            for (var i = 0; i < num; i++) {
                var newe = data[i];
                var Str = newe.beginTime.substring(0,16)+"-"+newe.endTime.substring(11,16);


                if(newe.kwType=="0") {
                    //str += '<div class="kw-signin-block" onclick="goSignDetailNew(\''+newe.ksId+'\',\''+newe.kcId+'\')">';
                    str+='<li><div class="news-type blue">未开始</div>';


                }else if (newe.kwType=="1") {
                    //str += '<div class="kw-signin-block" onclick="goSignComment(\''+newe.ksId+'\',\''+newe.kcId+'\')">';
                    str+='<li><div class="news-type blue-bg1">待签到</div>';

                }else if (newe.kwType=="2") {
                    //str += '<div class="kw-signin-block" onclick="goSignDetail(\''+newe.ksId+'\',\''+newe.kcId+'\')">';
                    str+='<li><div class="news-type grey-bg">已结束</div>';
                    //查看签到的详情


                }
                var  Str = "["+newe.kmmc+"]"+"-"+newe.kcPlace;
                str+='<h1 class="ellipsis">'+Str+'</h1>'+
                    '<div class="div-line-txt">监考老师：<span>'+newe.jkName+'</span></div>'+
                    '<div class="div-line-txt">巡考老师：<span>'+newe.xkName+'</span></div>'+
                    '<div class="div-line-txt">考试时间：<span>'+Str+'</span></div>'+
                    '</div></li>';
            }

        }

        $('#nodate-ctn').hide();
        if (isBlank(str)) {
            $('#nodate-ctn').show();
            $('#my-society-list').html(str);
        } else {
            $('#my-society-list').html(str);
        }
    }

    function initListener() {

        $("#kwHandle").on("click",function () {
            window.location.href = "/phone/kwmanagement/kwTeacherDetail?token=${token}&applyId=${applyId}&type=0";

        });
        $("#myjkHandle").on("click",function () {
            window.location.href = "/phone/kwmanagement/kwTeacherDetail?token=${token}&applyId=${applyId}&type=1";

        });
        $("#myxkHandle").on("click",function () {
            window.location.href = "/phone/kwmanagement/kwTeacherDetail?token=${token}&applyId=${applyId}&type=2";

        });

        $("#signHandle").on("click",function () {
            window.location.href = "/phone/kwmanagement/kwTeacherSignList?token=${token}&applyId=${applyId}&type=4";
        });

        $("#waitsignHandle").on("click",function () {
            window.location.href = "/phone/kwmanagement/kwTeacherSignList?token=${token}&applyId=${applyId}&type=0";
        });

        $("#endsignHandle").on("click",function () {
            window.location.href = "/phone/kwmanagement/kwTeacherSignList?token=${token}&applyId=${applyId}&type=2";
        });


    }



</script>

</html>
